package com.packenius.library.xspdf;

/**
 * Pure data object for holding font encoding and character range within a text
 * string.
 * 
 * @author Christian Packenius, 2013.
 */
class XSFontEncodingUsage {
  /**
   * Font encoding object. <i>null</i> for standard encoding.
   */
  final XSAlternativeFontEncoding fontEncoding;

  /**
   * First character within the text string (inklusive).
   */
  final int firstCharacterIndex;

  /**
   * Last character within the text string (exklusive).
   */
  final int lastCharacterIndex;

  /**
   * Constructor.
   * 
   * @param fontEncoding Font encoding object. <i>null</i> for standard
   *          encoding.
   * @param firstCharacterIndex First character within the text string
   *          (inklusive).
   * @param lastCharacterIndex Last character within the text string
   *          (exklusive).
   */
  XSFontEncodingUsage(XSAlternativeFontEncoding fontEncoding, int firstCharacterIndex, int lastCharacterIndex) {
    this.fontEncoding = fontEncoding;
    this.firstCharacterIndex = firstCharacterIndex;
    this.lastCharacterIndex = lastCharacterIndex;
  }
}
